home *** CD-ROM | disk | FTP | other *** search
/ JCSM Shareware Collection 1996 September / JCSM Shareware Collection (JCS Distribution) (September 1996).ISO / bother__ / cenvid.zip / CENVIDOS.ZIP / CENVI.DOC < prev    next >
Text File  |  1995-04-01  |  63KB  |  1,185 lines

  1.                     CEnvi Shareware Manual, Chapter 1:
  2.                        CEnvi Unregistered Shareware
  3.  
  4.                      CEnvi unregistered version 2.00
  5.                              29 March 1995
  6.  
  7.                        CEnvi Shareware User's Manual
  8.  
  9.                  Copyright 1993, Nombas, All Rights Reserved.
  10.           Published by Nombas, 64 Salem Street, MEDFORD MA 02155 USA
  11.           
  12.                           VOICE (617) 391-6595
  13.                           BBS   (617) 391-3718
  14.                           FAX   (617) 391-3842
  15.  
  16.           Thank you for trying this shareware version of CEnvi from Nombas.
  17.  
  18.                           _______
  19.                      ____|__     |                (R)
  20.                   --|       |    |-------------------
  21.                     |   ____|__  |  Association of
  22.                     |  |       |_|  Shareware
  23.                     |__|   o   |    Professionals
  24.                   -----|   |   |---------------------
  25.                        |___|___|    MEMBER
  26.  
  27.  
  28. 1.  CEnvi Unregistered Shareware
  29.  
  30. 1.1.  Introduction to Cmm and CEnvi
  31.  
  32.           Cmm (C minus minus) is 'C' for the rest of us.  CEnvi runs Cmm
  33.           programs in the DOS, Windows, OS/2, etc... environments.
  34.           Together, CEnvi and Cmm make the power and flexibility of the C
  35.           programming language part of every computer user's environment,
  36.           without the hardware, time, and programmer resources needed for
  37.           developing full-blown C programs.
  38.  
  39.           With CEnvi and Cmm, anyone can take control of their computer
  40.           environment.  C is not just for programming nerds anymore.  CEnvi
  41.           utilites, macros, batch files, and scripts can quickly be
  42.           created, shared, and modified among all computer users,
  43.           professional and amateur alike.
  44.  
  45.           CEnvi can be incorporated at a pace that is comfortable to you:
  46.           you may only want to use CEnvi code set up by a more experienced
  47.           user, you may want to enhance existing batch files with a line or
  48.           two of CEnvi code, or you may write complete utilities using
  49.           CEnvi.
  50.  
  51. 1.2.  CEnvi unregistered shareware version
  52.  
  53.           This package is the unregistered shareware version of CEnvi.
  54.           Nombas provides this unregistered shareware version of CEnvi so
  55.           that you can try the program for a 30 days before deciding whether
  56.           to buy.  If, after 30 Days of using using this product, you
  57.           think CEnvi will be useful to you and/or your organization then
  58.           use the registration form at the end of this document (or see the
  59.           file: REGISTER.DOC) to register CEnvi.
  60.  
  61. 1.2.1   Why you should register
  62.  
  63.           If you register, then you will receive:
  64.             *The latest version of CEnvi for all supported platforms
  65.               (currently DOS, OS/2, and Windows, with NT support expected
  66.               soon) without the annoying "Please Register" reminder.
  67.             *The CEnvi user's manual (almost 100 pages, including a
  68.               description of the Cmm programming language, a tutorial for
  69.               those who have never programmed, and descriptions and
  70.               examples of the nearly 150 functions included in the CEnvi
  71.               library).
  72.             *Free incremental electronic downloads for new versions of
  73.               CEnvi for all supported operating systems.
  74.             *Unlimited support from Nombas and CEnvi/Cmm users through
  75.               CompuServe (72212,1622), internet (bsn@world.std.com), the
  76.               cenvi-cmm e-mail mailing list (cenvi-cmm@world.std.com), and
  77.               the Nombas BBS (617-391-6595).
  78.             *Access to the growing list of CEnvi utilities and libraries
  79.               (some of which are included in this unregistered shareware
  80.               package, and others are contributed by Nombas and CEnvi/Cmm
  81.               users to the electronic locations described above).
  82.             *Discounts for additional registered version of CEnvi to use
  83.               within your organization.
  84.  
  85. 1.2.2   How to register
  86.  
  87.           See the REGISTER.DOC document that is included with this package
  88.           (and is also duplicated at the end of this document), to purchase
  89.           a registered version of CEnvi.
  90.  
  91. 1.3.  Installing CEnvi, documents, and sample files
  92.  
  93. 1.3.1   Installing CEnvi for DOS
  94.  
  95.           Create a directory to install CEnvi for DOS in(we recommend 
  96.           CENVIDOS). UNZIP cenvidos.zip into the directory you created. CEnvi 
  97.           for DOS includes two executables. CEnvid.exe is a regular DOS
  98.           program. CEnvid32.exe is a 32 bit DOS version. It is useful if you
  99.           find that the regular DOS version of CEnvi is running out of
  100.           memory.
  101.           
  102.           The first time you run CEnvi for DOS, it will run the Cmm 
  103.           installation script. The installation script does 2 things if you
  104.           choose. It creates a CMMPATH environment variable pointing to the 
  105.           directory you chose and adds the CEnvi path to the DOS PATH.
  106.           
  107.  
  108. 1.3.2   Installing CEnvi for Windows
  109.  
  110.           Create a directory to install CEnvi for Windows in(we recommend 
  111.           CENVIWIN). UNZIP cenviwin.zip into the directory you created. CEnvi 
  112.           for Windows includes two executables. CEnviw.exe is a Windows
  113.           program that is both a Cmm interpreter and a Windows Command line
  114.           and servewin.com allows windows to control DOS sessions.
  115.                     
  116.           The first time you run CEnvi for Windows from program manager, it
  117.           will run the Cmm installation script. The installation script will
  118.           set up CEnvi for Windows Properly. For Windows, install will add
  119.           the CMMPATH profile value in WIN.INI (in the [CEnvi] section), and
  120.           will also add the CMM file extension to the [Extensions] section
  121.           in WIN.INI.It will create a CEnvi program group containing CEnvi
  122.           for Windows, and a few sample Cmm utilities.
  123.           
  124. 1.3.3   Installing CEnvi For OS/2
  125.  
  126.           Create a directory to install CEnvi for OS/2 in(we recommend 
  127.           CENVIOS2). UNZIP cenvios2.zip into the directory you created. CEnvi 
  128.           for OS/2 includes two executables. CEnvi2.exe is a OS/2 program.
  129.           CEnvi2PM.exe is used by CEnvi2.exe to make presentation manager
  130.           calls. It must be in the current directory or in the search 
  131.           path for many of the Os/2 samples to work correctly.
  132.                     
  133.           The first time you run CEnvi for OS/2, it will run the Cmm 
  134.           installation script. The installation script will set up CEnvi for
  135.           OS/2 Properly. The installation script does 2 things if you
  136.           choose. It creates a CMMPATH environment variable pointing to the 
  137.           directory you chose and adds the CEnvi path to the DOS PATH.
  138.                     
  139. 1.3.4   4DOS and 4OS2 users - .cmm executable extension
  140.  
  141.           4DOS and 4OS2 users can directly execute .cmm files by
  142.           associating the .cmm file extension with your CEnvi executable.
  143.           Assuming the CEnvi.exe is in the c:\CENVID directory, then a 4DOS
  144.           user would want to add this line to AUTOEXEC.BAT:
  145.               SET .cmm=C:\CENVID\CEnvi.exe
  146.  
  147. 1.4.  Removing CEnvi unregistered shareware
  148.  
  149.           If, after testing CEnvi for a few weeks, you choose not to
  150.           register this version of CEnvi, then you should remove the
  151.           program from your computer.  (Also please consider telling Nombas
  152.           why CEnvi did not suit your needs; we need such feedback if we
  153.           are to improve the product.)
  154.  
  155.           For all operating systems, the first step for removing CEnvi is
  156.           to delete all the CEnvi files and the directory that you copied
  157.           the files to.  The next step depends on your operating system:
  158.  
  159. 1.4.1   DOS de-installation
  160.  
  161.           Install.cmm made two changes to C:\AUTOEXEC.BAT: the directory
  162.           that CEnvi was in will have been added to your PATH statement,
  163.           and the CMMPATH environment variable will have been added.  To
  164.           de-install CEnvi you must remove the CEnvi directory from the
  165.           PATH statement and you must also delete the "SET CMMPATH=..."
  166.           line.
  167.  
  168. 1.4.2   OS/2 de-installation
  169.  
  170.           Install.cmm made two changes to C:\CONFIG.SYS: the directory that
  171.           CEnvi was in will have been added to your PATH statement, and the
  172.           CMMPATH environment variable will have been added.  To de-install
  173.           CEnvi you must remove the CEnvi directory from the PATH statement
  174.           and you must also delete the "SET CMMPATH=..." line.
  175.  
  176. 1.4.3   Windows de-installation
  177.  
  178.           Install.cmm made two changes to WIN.INI: the CMM profile
  179.           extension was added and the CMMPATH profile string was created.
  180.           To de-install CEnvi you must edit WIN.INI (with NOTEPAD.EXE for
  181.           example) and remove from the [Extensions] section a line similar
  182.           to this:
  183.                CMM=C:\CENVI\CENVI.EXE ^.CMM
  184.           and also remove these line (or lines much like these) from
  185.           WIN.INI:
  186.                [CEnvi]
  187.                CMMPATH=E:\NOMBAS\CENVI\EXAMPLES.WIN
  188.  
  189. 1.5.  Using this package
  190.  
  191. 1.5.1   Unregistered CEnvi shareware executable
  192.  
  193.           The executables in this package, are identical to
  194.           the registered versions of CEnvi at the time this package was
  195.           created with one exception: this unregistered shareware version
  196.           will occasionally put up a screen to remind you to register your
  197.           copy of CEnvi (see the bottom of this document or REGISTER.DOC).
  198.           Nombas has spent, and will continue to spend, time and resources
  199.           developing and supporting CEnvi and Cmm.  Without your honest
  200.           support Nombas cannot improve and support CEnvi (and pay
  201.           mortgage, feed the kids, pay the doctor, etc...).
  202.  
  203.           It is likely that months have elapsed since this shareware
  204.           package has been put together (see date at the top of this file).
  205.           If so, then the version of CEnvi you receive will be an updated
  206.           version of this one.  At the time of this release, incremental
  207.           improvements have been planned in memory use, speed of execution,
  208.           debugging tools, developer tools, and documentation.
  209.  
  210. 1.5.2   Example programs
  211.  
  212.           The following example programs are included with this shareware
  213.           version of CEnvi.  Those files with a batch extension (.BAT for
  214.           DOS and .CMD for OS/2) can be run by invoking the batch file
  215.           directly.  Those files with the CEnvi source file extension
  216.           (.CMM) are invoked by executing CEnvi with the file name as the
  217.           first argument (e.g. CENVI FranTick.cmm).  Files with different
  218.           (e.g., *.LIB, *.H, *.DAT) are files used by CEnvi some of the
  219.           example programs.
  220.  
  221.           Many of the files will provide help for how to use them if they
  222.           are invoked with "/?" as the only parameter.
  223.  
  224.           All of these example files are here for you to view, study,
  225.           experiment with, and alter for your own use.  The Nombas BBS will
  226.           continue to gather CEnvi and Cmm example files created by Nombas
  227.           or uploaded by CEnvi and Cmm users; so registered users will have
  228.           a large library to choose from (maybe some other CEnvi user has
  229.           already solved your need, or perhaps their need is close to yours
  230.           and you will only have to make small modifications to someone
  231.           else's uploaded CEnvi program). 
  232.  
  233. 1.5.3   DOS example files:
  234.             *AllDirs.bat: Perform a command in this directory and all
  235.               sub-directories
  236.             *AllFiles.bat: Perform a command on all files matching a given
  237.               file specification
  238.             *Ascii.bat: Display the ascii character table
  239.             *BatLoops.bat: Examples of various methods CEnvi can use to
  240.               allow looping within batch files
  241.             *BattMem.cmm: Show values stored in a PC's battery-protected
  242.               memory
  243.             *CDfind.bat: Change to directory based on name search
  244.             *CmdCount.bat: Repeat DOS command Count times
  245.             *CmmEdit.cmm: VERY simple text editor; developed step-by-step
  246.               in the tutorial chapter of the CEnvi User Manual.
  247.             *DelOld.bat: Delete files older than specified age
  248.             *DelTree.bat: Delete a directory tree
  249.             *DirDiff.cmm: Compare two directory listings for differences
  250.             *DirStat.bat: Extract specific fields from a DOS "DIR" listing
  251.             *DiskFree.bat: Display free space on a disk drive
  252.             *DoList.cmm: Perform action on every element of a list
  253.             *DosTime.bat: Show time according to computer's internal clock
  254.             *EnviAsk.bat: Prompt and receive user input with many options
  255.             *EnviAsks.bat: Many examples of user input using EnviAsk.bat
  256.               and GetUKey.cmm
  257.             *EnvSort.bat: Sort environment variables alphabetically
  258.             *ErrLev.bat: Execute a command and set the ERRLEV value as the
  259.               return code, which makes ERRORLEVEL a variable
  260.             *Fibonacc.cmm: Two methods for generating the Fibonacci
  261.               sequence
  262.             *FileFind.bat: Wildcard search for files on current drive or on
  263.               all drives
  264.             *Find#.cmm: Extract a number from wordy output; used by
  265.               DirStat.bat
  266.             *FloppyIn.bat: Check if a floppy is in drive A: or B:
  267.             *FranTick.cmm: Animated tick who drank too much coffee
  268.             *GetUKey.cmm: Display a choice prompt and then set an
  269.               environment variable based on user's selection
  270.             *Hello.cmm: My first Cmm program. Used to begin the Cmm
  271.               tutorial.
  272.             *HexDump.bat: Display hexadecimal dump of a file
  273.             *Install.cmm: Install this version of CEnvi.
  274.             *Int16.bat: Display key code from keyboard interrupt 16 hex
  275.             *IsDay_1.bat: One method to check if it is a specific day of
  276.               the week
  277.             *IsDay_2.bat: Another method to check if it's a specific day of
  278.               the week
  279.             *IsItFri.bat: Is it Friday?
  280.             *KbdBuf.bat: Alter the size of the keyboard buffer
  281.             *KbdRate.bat: Alter the typematic rate of the keyboard
  282.             *KeyCode.bat: Display keycode of any key pressed
  283.             *KeyState.bat: Get or set the state of the NumLock, CapsLock,
  284.               or Insert keys
  285.             *KeyStuff.bat: Stuff characters into the keyboard buffer
  286.             *MemBlock.bat: Trace through DOS's allocated memory blocks
  287.             *Message.bat: Display very important message in box on screen
  288.             *Mouse.bat: Demonstrate reading a mouse's position and state
  289.             *MultiDir.bat: DOS's "DIR" command allowing multiple file
  290.               specifications
  291.             *NumLock.bat: Set the NumLock key on
  292.             *OneADay.bat: Perform any command(s) no more than once per day
  293.             *OptParms.lib: Library of routines for parsing the optional
  294.               parameters for executing a program. #included in other files
  295.             *OS2Sessn.cmm: Execute sessions from DOS under OS/2
  296.             *PathAdd.bat: Add a directory to your PATH environment
  297.               variable.
  298.             *PathDel.bat: Remove a directory from your PATH environment
  299.               variable
  300.             *PathStak.bat: Multi-level save or restore of current drive and
  301.               directory so that you can change drives and directories and
  302.               still return to this one
  303.             *PathSubs.bat: Use DOS's SUBST command to shorten your PATH
  304.               environment variable so that more paths can be fit with DOS'
  305.               127-byte limit
  306.             *Primes.bat: Demonstrate automatic array allocation for
  307.               calculating prime numbers
  308.             *Print.cmm: Copy file to printer, treating printer as a file
  309.             *PrmptDay.bat: Change command-line-prompt to display today's
  310.               date
  311.             *Quote.bat: Choose a "profound" quote at random
  312.             *REBOOT_1.BAT: One method to reboot your computer
  313.             *REBOOT_2.BAT: Another method to reboot your computer
  314.             *Redirect.bat: Demonstrate how to redirect standard output,
  315.               input, and errors while running any command
  316.             *Restrict.cmm: Allow a limited subset of DOS commands
  317.             *RunTime.bat: Rudimentary scheme for executing a command at a
  318.               certain time of day.
  319.             *Scrandom.bat: Use Screen.lib to draw randomly colored squares
  320.               around the screen
  321.             *Screen.lib: Library, #included in other files, for screen
  322.               output: colors, boxes, lines, etc...
  323.             *ScrnSave.bat: Use Screen.lib to save screen to a file
  324.             *SortLen.bat: Sort any file based on line length
  325.             *Sound.bat: Play a frequency for a given time period
  326.             *Tee.cmm: Save screen output to a file while it is being
  327.               displayed on the screen
  328.             *ValidDir.bat: Verify if a directory is valid
  329.             *VLabel.bat: Read or set disk volume label
  330.             *Wait.bat: Pause and do not return for specified number of
  331.               seconds
  332.             *Which.bat: Find in PATH which command is executed
  333.             *WinClip.cmm: Utility to access Windows clipboard from DOS
  334.             *WinClib.lib: Function to access Windows clipboard from DOS
  335.             *WinIni.lib: Modify Windows INI files from plain DOS
  336.             *WinShell.bat: Start windows with a specific shell.  Run
  337.               Windows for a single program.
  338.  
  339. 1.5.4   OS/2 example files:
  340.  
  341.           For many of these functions, you must ensure that CEnvi2PM.exe is
  342.           accessible (in the current directory or in a directory in the
  343.           search PATH).  CEnvi2PM.exe is a small program used transparently
  344.           by CEnvi.exe when the PMxxxxx() calls are used to PM-specific
  345.           functions.
  346.             *AllDirs.cmd: Perform a command in this directory and all
  347.               sub-directories
  348.             *AllFiles.cmd: Perform a command on all files matching a given
  349.               file specification
  350.             *AltHome.cmd: Switch OS/2 session between windowed and
  351.               full-screen, much like ALT-HOME works in DOS sessions
  352.             *BarClock.cmd: Display time in title bar of active window
  353.             *BatLoops.cmd: Examples of various methods CEnvi can use to
  354.               allow looping within batch files
  355.             *BckGrnd.cmd: Specify a new file as your desktop background
  356.               image
  357.             *Bouncy.cmd: Start a bouncy OS/2 Command Window. This
  358.               demonstrates moving windows and silliness.
  359.             *CDfind.cmd: Change to directory based on name search
  360.             *CEnviSet.cmd: This file can be used instead of CEnvi.exe if
  361.               you are using environment variables as Cmm variables and need
  362.               them to be changed in the current OS/2 environment.
  363.             *ClipBrd.cmd: Get or modify clipboard text
  364.             *ClipBrd.lib: Library of routines for reading from or writing
  365.               to the clipboard
  366.             *CmmEdit.cmm: VERY simple text editor; developed step-by-step
  367.               in the tutorial chapter of the CEnvi User Manual.
  368.             *Comm.lib: Serial communications routines
  369.             *DelOld.cmd: Delete files older than specified age
  370.             *DelTree.cmd: Delete a directory tree
  371.             *DeskLock.cmd: Lock or unlock desktop
  372.             *DevIOCtl.lib: Function library for OS/2's DosDevIOCTL
  373.               functions
  374.             *DirDiff.cmm: Compare two directory listings for differences
  375.             *DiskFree.cmd: Display free space on a disk drive
  376.             *DlgCtrl.lib: Library of routines for interactive with PM
  377.               dialog boxes and other windows with sub-windows - this
  378.               library is only in its early stages
  379.             *DoFiles.cmd: Perform any command on a list of files selected
  380.               from a file dialog box
  381.             *DoList.cmd: Perform action on every element of a list
  382.             *DoMenu.cmd: Execute any menu selection of a PM application,
  383.               based on the name of the window and the menu text
  384.             *DOS.cmd: Perform DOS command from an OS/2 session, with the
  385.               option to "see" output of the command; mirrors OS2.BAT
  386.             *DosCalls.lib: Example library of "wrapper" function calls to
  387.               OS/2 API calls in the DosCalls library.  This file is
  388.               "#include"ed in many of the other example files.
  389.             *DropMany.cmd: Drag many files for single launch of program
  390.               object
  391.             *DumpIni.cmd: Display profile settings from a .INI file; uses
  392.               Profile.lib
  393.             *EditCmd.cmd: Use PM's file dialog (via FileDlg.lib) to select
  394.               a *.cmd file to edit.
  395.             *EnvSort.cmd: Sort environment variables alphabetically
  396.             *ErrLev.cmd: Execute a command and set the ERRLEV value as the
  397.               return code, which makes ERRORLEVEL a variable
  398.             *ExamineW.cmd: Display lots of data about any PM window on the
  399.               desktop, and sub-windows (this file in early stages)
  400.             *Fibonacc.cmm: Two methods for generating the Fibonacci
  401.               sequence
  402.             *FileDlg.lib: A simple interface to the WinFileDlg() PM
  403.               function.  This library file is #include'd in some of the
  404.               other CEnvi sample files.
  405.             *FileFind.cmd: Wildcard search for files on current drive or on
  406.               all drives
  407.             *FileIO.lib: Function to interface directly with OS/2's File IO
  408.             *Find#.cmm: Extract a number from wordy output; used by
  409.               DirStat.bat
  410.             *FranTick.cmm: Animated tick who drank too much coffee
  411.             *FSSlave.cmm: Control full screen OS/2 session from
  412.               TEXTBOSS.LIB
  413.             *GetUKey.cmd: Display a choice prompt and then set an
  414.               environment variable based on user's selection 
  415.             *GiveMem.lib: Library of routines for shareing memory with
  416.               other applications whose memory is otherwise "protected"
  417.             *Hello.cmm: My first Cmm program. Used to begin the Cmm
  418.               tutorial.
  419.             *HexDump.cmd: Display hexadecimal dump of a file
  420.             *HideTask.cmd: Hide task from the Task List window
  421.             *IDLE.cmd: Change process priority to run a CEnvi program only
  422.               during system idle time.
  423.             *IdleProg.cmd: Execute a program in the background; i.e., run
  424.               only during system idle time.
  425.             *Install.cmm: Install this version of CEnvi.
  426.             *IsItFri.cmd: Is it Friday?
  427.             *IsRun.cmd: Is process XXXXX running?
  428.             *KbdRate.cmd: Alter the typematic rate of the keyboard; in many
  429.               cases faster than OS/2 Keyboard tool can set it
  430.             *KeyCode.cmd: Display keycode of any key pressed
  431.             *KeyGhost.cmd: Sample for using KeyPush.lib to determine if
  432.               CEnvi is worth the price of registration.
  433.             *KeyPush.cmd: Send keystroke commands directly to a window by
  434.               window title; a quick interface into KeyPush.lib
  435.             *KeyPush.lib: Library of routines for sending keystrokes to PM
  436.               or Windowed applications.
  437.             *KeyState.cmd: Get or set the state of the NumLock, CapsLock,
  438.               or Insert keys for current session or for the whole WPS
  439.             *Kill.cmd: Terminate a running process by Process ID, Window
  440.               title, full name, or partial name
  441.             *MenuCtrl.lib: Library of routines for interactive with PM
  442.               menus
  443.             *MsgBox.lib: A wrapper library for the PM WinMessageBox()
  444.               function.  This file is #include'd in other CEnvi sample
  445.               files.
  446.             *MsgBoxes.cmd: Show various message box types using the
  447.               function in MsgBox.lib.
  448.             *NamePipe.lib: Library for OS/2 Named Pipes
  449.             *NoTitleB.cmd: Remove selected elements of a window title bar
  450.             *NumLock.cmd: Turn on NUMLOCK key once, or maintain NUMLOCK ON.
  451.               A shadow of NumLock.cmd can be put in startup folder to
  452.               default computer to NumLock ON. "NumLock 1000" will check
  453.               every second to make sure that NUMLOCK is still set.
  454.             *ObjSet.cmd: Alter WPS object and folder settings
  455.             *OneADay.cmd: Perform any command(s) no more than once per day
  456.             *OnTop.cmd: Float window to top of all other windows
  457.             *OptParms.lib: Library of routines for parsing the optional
  458.               parameters for executing a program. #included in other files
  459.             *OS2.bat: Perform OS/2 command from a DOS session, with the
  460.               option to "see" output of the command; mirrors DOS.CMD.  Note
  461.               that this requires CEnvi for DOS
  462.             *OS2Time.cmd: Show time according to computer's internal clock
  463.             *OS2Wait.bat: CEnvi for DOS tool to suspend DOS session for
  464.               specified interval
  465.             *Parents.cmd: Show hierarchical list of ancestor's process ID's
  466.               and names
  467.             *PathAdd.cmd: Add a directory to your PATH environment
  468.               variable.
  469.             *PathDel.cmd: Remove a directory from your PATH environment
  470.               variable
  471.             *PathStak.cmd: Multi-level save or restore of current drive and
  472.               directory so that you can change drives and directories and
  473.               still return to this one
  474.             *PMdll.lib: Example library of "wrapper" routines to function
  475.               in the PM DLL (Presentatiom Manager Dynamic Link Library).
  476.               This file is "#include"ed in many of the other example files.
  477.             *Print.cmm: Copy file to printer, treating printer as a file
  478.             *PrmptDay.cmd: Change command-line-prompt to display today's
  479.               date
  480.             *ProcList.cmd: Show list of all running processes; their names
  481.               and ID's
  482.             *Profile.lib: Function library for accessing Profiles; i.e.
  483.               .INI files
  484.             *Quote.cmd: Choose a text-mode "profound" quote at random
  485.             *QuotePM.cmd: Choose a PM-mode "profound" quote at random
  486.             *RndBckgr.cmd: Randomly select desktop background, at specified
  487.               interval, from a list of graphic file specifications
  488.             *RunTime.cmd: Rudimentary scheme for executing a command at a
  489.               certain time of day.
  490.             *ScanCode.lib: Retrieve keyboard scan codes for ascii
  491.               characters
  492.             *ServeOS2.com: DOS TSR to work with TextBoss.lib for complete
  493.               keyboard control of DOS sessions
  494.             *Session.cmd: Replace OS/2's START command for greater control
  495.               of starting sessions, including name, position, font,
  496.               notebook settings, etc...
  497.             *Sessions.cmd: batch file to demonstarte various uses of
  498.               Session.cmd
  499.             *ShutDown.cmd: Automated shutdown or reboot of OS/2 system
  500.             *SortLen.cmd: Sort any file based on line length
  501.             *Sound.cmd: Play a frequency for a given time period
  502.             *Switch.cmd: Switch foreground application to another process
  503.               base on process ID, full name, or partial name
  504.             *SysInfo.cmd: Display system configuration parameters
  505.             *TempFldr.cmd: Open folder temporarily, to automatically close
  506.               when it no longer has focus; good for menus
  507.             *Terminal.cmd: A VERY basic terminal program; demonstrates
  508.               COMM.LIB
  509.             *TextBoss.lib: Library of routines to interactively windowed
  510.               DOS or OS/2 applications: can work with ServeOS2.com
  511.             *TextEcho.cmd: Demonstrate TextBoss.lib by shadowing a DOS or
  512.               OS/2 box from an OS/2 box
  513.             *TextWin.cmd: GET/PUT text from/to a windowed DOS or OS/2
  514.               session
  515.             *Threads.cmd: Display list of all threads in all running
  516.               processes
  517.             *UnHang.cmm: Monitor your system to detect OS/2 "hangs", where
  518.               the workplace shell stops responding, then kill or otherwise
  519.               handle the application that is causing the problem
  520.             *ValidDir.cmd: Verify if a directory is valid
  521.             *Wait.cmd: Pause and do not return for specified number of
  522.               seconds
  523.             *Which.cmd: Find in PATH which command is executed
  524.             *WinList.cmd: Display list of all PM windows
  525.             *WinMsg.lib: Routines to send or post messages to PM windows
  526.             *WinSet.cmd: Set the position, size, state, etc... of a PM
  527.               Window
  528.             *WinSpawn.cmd: Pass simple commands to Windows session running
  529.               WinSpawn.cmm
  530.             *WinSpawn.cmm: Run in Windows session from CEnvi for Windows to
  531.               receive commands from WinSpawn.lib
  532.             *WinSpawn.lib: WinSpawn() function to send commands to Windows
  533.               session running CEnvi for Windows and WinSpawn.cmm
  534.             *WinTools.cmd: Demonstrate many of the capabilities of
  535.               WinTools.lib
  536.             *WinTools.lib: Library of routines for manipulating PM windows
  537.               by name or by handle
  538.             *WIN_Boss.lib: work with CEnvi for Windows' ServeOS2.cmm
  539.               program to all full control of Windows applications from an
  540.               OS/2 script
  541.             *WPFolder.cmd: Open a desktop folder for any specified
  542.               directory and optionally switch to that window
  543.  
  544. 1.5.5   Windows example files:
  545.  
  546.           The following CEnvi source programs can be run by associating the
  547.           .cmm file extension with CEnvi.exe.  This can be done by using
  548.           the File Manager: select one of these .cmm files then choose
  549.           File/Association and select the full path to CEnvi.exe.  After
  550.           this, you can run any of these exmple files simply by
  551.           double-clicking on it.
  552.             *AddItem.cmm: Add Group and Item to Program Manager
  553.             *AllSave.cmm: Select SAVE option on all windows
  554.             *Ascii.cmm: Display the ascii character table
  555.             *BarClock.cmm: Display current time in title of active window
  556.             *BattMem.cmm: Show values stored in a PC's battery-protected
  557.               memory
  558.             *BMP.lib: Routines for reading and displaying .BMP files
  559.             *BmpView.cmm: Demonstrate the BMP.LIB routines by reading any
  560.               number of .BMP files and displaying them
  561.             *BootEd1.cmm: Start NotePad to edit c:\AutoExec.bat and
  562.               C:\Config.sys using Windows DLL's.
  563.             *BootEd2.cmm: Start NotePad to edit c:\AutoExec.bat and
  564.               C:\Config.sys using CEnvi's spawn() function.
  565.             *BugHunt.cmm: Example for using the ClipBrd.lib routines.
  566.               Constantly scan clipboard for "bug" in clipboard text
  567.             *ClipBrd.lib: Library of routines for reading from or writing
  568.               to the Windows clipboard
  569.             *ClipSort.cmm: Sort text in-place within the clipboard
  570.             *CmmEdit.cmm: VERY simple text editor; developed step-by-step
  571.               in the tutorial chapter of the CEnvi User Manual.
  572.             *CmmGroup.cmm: Create a CEnvi Programs group in Presentation
  573.               Manager with all of the .CMM files in it
  574.             *Comm.lib: Simplified function interface into Windows' serial
  575.               communication routines
  576.             *DDE.lib: Library of common routines and definitions for
  577.               Dynamic Data Exchange (DDE)
  578.             *DDEcli.cmm: Sample DDE client; works with DDEsrv.cmm
  579.             *DDEcli.lib: Library of routines for a DDE client
  580.             *DDEdir.cmm: Show directory listing of all DDE servers
  581.             *DDEsrv.cmm: Sample DDE server; works with DDEcli.cmm
  582.             *DDEsrv.lib: Library of routines for a DDE server
  583.             *DelOld.cmm: Delete files older than specified age
  584.             *DirDiff.cmm: Compare two directory listings for differences
  585.             *DlgCtrl.lib: Library of routines for interactive with Windows
  586.               dialog boxes and other windows with sub-window
  587.             *DosTime.cmm: Show time according to computer's internal clock
  588.             *DOS_BOSS.LIB: Functions for sending keystrokes to and reading
  589.               data from DOS sessions
  590.             *DOS_ECHO.CMM: Demonstrate DOS_BOSS.LIB by echoing text to/from
  591.               DOS session
  592.             *DOS_LOOK.CMM: Use DOS_BOSS.LIB to look at contents of a DOS
  593.               window
  594.             *Dropper.cmm: Perform command for all files Drag-&-Dropped to
  595.               this tool
  596.             *ExamineW.cmd: Display lots of data about any active window and
  597.               its sub-windows
  598.             *ExitWin.cmm: Exit Windows; options to save files, force
  599.               applications to quit, restart Windows, and reboot computer
  600.             *Fibonacc.cmm: Two methods for generating the Fibonacci
  601.               sequence
  602.             *FranTick.cmm: Animated tick who drank too much coffee
  603.             *FullScrn.cmm: Run any command started in maximized window
  604.             *GDI.cmm: Demonstrate some of Windows' graphics functions from
  605.               GDI.lib
  606.             *GDI.lib: Library of a few of Windows' graphics routines
  607.             *GloblMem.lib: Functions to work with Windows' global memory
  608.               resources
  609.             *Hello.cmm: My first Cmm program. Used to begin the Cmm
  610.               tutorial.
  611.             *HexDump.cmm: Display hexadecimal dump of a file
  612.             *Icon.lib: Functions for setting minimized icon
  613.             *IconMany.cmm: Show all of the icons in Program Manager
  614.             *Icons.cmm: Minimize all windows.  Demonstrate PostMessage()
  615.               from Message.lib.
  616.             *IdleTime.cmm: "ScreenSaver" - Show clock if computer is idle
  617.             *InputBox.cmm: Demonstrate uses of the InputBox() routine in
  618.               InputBox.lib
  619.             *InputBox.lib: InputBox() function to allow for a dialog-like
  620.               box for user input
  621.             *Install.cmm: Install this version of CEnvi.
  622.             *KeyCode.cmm: Display keycodes returned by getch().
  623.             *KeyGhost.cmm: Demonstrate how to use KeyPush.lib to control
  624.               other applications.
  625.             *KeyPush.lib: Library of routines created for passing
  626.               keystrokes to a window with the current focus.
  627.             *KillDOS.cmm: Force DOS window to close
  628.             *MenuCtrl.lib: Library of routines for interactive with menus
  629.             *MenuNot.cmm: Disable or delete a menu item
  630.             *Message.lib: Wrapper for Windows' PostMessage() and
  631.               SendMessage() function to send commands to windows.
  632.             *MsgBox.lib: A wrapper library for Windows' MessageBox()
  633.               function.  This file is #include'd in other CEnvi sample
  634.               files.
  635.             *MsgBoxes.cmm: Show various message box types using the
  636.               function in MsgBox.lib.
  637.             *MyCal.cmm: Start/menu/position calendar
  638.             *NumLock.cmm: Set the NUMLOCK key ON
  639.             *OneProg.cmm: Run one and only one program until it exits
  640.             *OnTop.cmm: Float window to top of all other windows
  641.             *OpenCmm.cmm: Use Windows' common dialog (via PickFile.lib) to
  642.               select a *.cmm file to edit.
  643.             *OptParms.lib: Library of routines for parsing the optional
  644.               parameters for executing a program. #included in other files
  645.             *OS2Sessn.cmm: Execute sessions from Windows under OS/2
  646.             *PGroups.cmm: list all of the groups and items Program Manager;
  647.               uses ProgMan.lig
  648.             *PickFile.lib: A simple interface to the GetOpenFileName()
  649.               function in the Windows Common Dialog DLL.  This library file
  650.               is #include'd in some of the other CEnvi sample files.
  651.             *PMButt.cmm: Replace Program Manager with a tiny button in
  652.               upper-left corner for access to all PM items
  653.             *PMCorner.cmm: Minimize Program Manager and then move its icon
  654.               to the lower-right corner of the screen.
  655.             *PongTime.cmm: Bounce the Windows clock mini-app around
  656.             *Print.cmm: Copy file to printer, treating printer as a file
  657.             *Profile.lib: Function library for accessing Profiles; i.e.
  658.               .INI files
  659.             *ProgMan.lib: Library of routines using DDE to communication
  660.               with Program Manager
  661.             *Quote.cmm: Choose a "profound" quote at random
  662.             *RebootNT.cmm: Reboot from Windows NT
  663.             *RndWalls.cmm: Random wallpaper selection at timed intervals
  664.             *RunAgain.cmm: Repeatedly run command at specified interval
  665.             *RunTime.cmm: Schedule a command to execute at a specified hour
  666.               and minute.
  667.             *SafeFMan.cmm: File Manager with dangerous menu options removed
  668.             *SaveScrn.cmm: Start screen saver now
  669.             *ServeOS2.cmm: Work with CEnvi for OS/2 and WIN_BOSS.LIB to
  670.               control Windows sessions from OS/2
  671.             *ServeWIN.com: DOS TSR to work with DOS_BOSS.LIB for complete
  672.               keyboard control of DOS sessions
  673.             *TaskButt: Task Manager replacement; 1-click access to tasks
  674.             *Terminal.cmm: A simple terminal program; demonstrate some of
  675.               the functions in COMM.lib
  676.             *WhoRYou.cmm: Design and implement a dialog box using CEnvi's
  677.               MakeWindow() and DoWindows() functions
  678.             *WinBeep.cmm: Call Windows' MessageBeep() function.
  679.             *Window.lib: A few functions and many defined values useful for
  680.               CEnvi's MakeWindow(), BreakWindow(), and DoWindows()
  681.               functions
  682.             *WinExec.lib: A wrapper library for Windows' WinExec()
  683.               function.  This file is #include'd in other CEnvi sample
  684.               files.
  685.             *WinExecs.cmm: Demonstration of Windows' WinExec() function
  686.               using the wrapper from WinExec.lib.
  687.             *WinList.cmm: Show a list of all Windows, their handles, and
  688.               their children.
  689.             *WinMsg.cmm: Demonstrate how to make a window, and show all the
  690.               messages that go to that window
  691.             *WinRun.bat: Run Windows commands from DOS session; client to
  692.               work with WinRun.cmm
  693.             *WinRun.cmm: Run Windows commands from DOS session; server for
  694.               WinRun.bat
  695.             *WinShell.bat: Start windows with a specific shell.  Run
  696.               Windows for a single program.  This use CENVI.EXE for DOS.
  697.             *WinTools.cmm: Demonstrate many of the capabilities of
  698.               WinTools.lib
  699.             *WinTools.lib: Library of routines for directly manipulating
  700.               windows by name or by handle
  701.             *WinUtil.lib: A small selection of utilities that may be
  702.               #include'd in CEnvi code to get simple access to Windows DLL
  703.               functions.
  704.  
  705. 1.6.  CEnvi - A Cmm Interpreter
  706.  
  707.           This section describes the CEnvi program, and describes the
  708.           various methods for use CEnvi.exe to execute Cmm programs.
  709.  
  710. 1.6.1   What is CEnvi?
  711.  
  712.           CEnvi is the first application to implement the Cmm programming
  713.           language.  CEnvi is a Command-line version of a Cmm interpreter,
  714.           and it can use Environment variables as if they were global Cmm
  715.           variables.  CEnvi contains a reasonable facsimile of the standard
  716.           C library, and can link at runtime to external Cmm libraries.
  717.  
  718.           The "Envi" and the "C" in CEnvi reflects the envy that computer
  719.           professionals often feel when they are working on a computer that
  720.           does not have a complete C programming environment.  "Envi" also
  721.           refers to the environment variables that CEnvi attempts to work
  722.           with as if they were regular Cmm variables.
  723.  
  724.           Like all implementations for Cmm, CEnvi is portable between
  725.           operating systems.  It is currently testing under DOS, OS/2, and
  726.           Windows, and other OS ports are in the works. NT and Presentation
  727.           manager are currently available in beta form.
  728.  
  729. 1.6.2   Environment Variables
  730.  
  731.           Variables in all UPPERCASE letters are taken from the environment
  732.           variables.  Environment variables are treated like other
  733.           variables except that they don't need quotes around them to
  734.           default to being strings if they don't match another type.
  735.  
  736.           In the source code, the only difference between a variable and an
  737.           environment variable is that environment variables are all
  738.           UPPER_CASE letters.  When an environment variable is first used,
  739.           it is read from the environment block and some assumptions are
  740.           made about what kind of variable it is; this can lead to problems.
  741.           When I=666 is interpreted as the number 666 when really it maybe
  742.           should have been the string "666".  Before the program exits, all
  743.           environment variables used by the code are then written to the
  744.           environment block.
  745.  
  746.           In some implementations (CEnvi for DOS, for example) the
  747.           environment variables remain changed even after the Cmm
  748.           interpreter exits.  In other cases, special kludges must be added
  749.           to alter a parent process' environment variables (see ESet() for
  750.           OS/2).
  751.  
  752. 1.6.3   Special Environment Variables
  753.  
  754.           These environment variables affect where CEnvi looks for source
  755.           files:
  756.             *CMMPATH: This environment will be checked for directories to
  757.               search for include files if the include file is not in the
  758.               current directory.  For Windows, this value may come from the
  759.               CMMPATH profile value in WIN.INI (in the [CEnvi] section).
  760.             *PATH: Batch-file source files (see below) will be searched in
  761.               these directories if not found in the current directory.
  762.             *CENVI_ESET: In those environment for which CEnvi cannot
  763.               covertly alter the environment variables of the command
  764.               interpreter (e.g., OS/2), this environment variable specifies
  765.               a file name.  CEnvi will write the strings necessary for the
  766.               command interpreter to set environment variables as altered
  767.               by your Cmm code.  See the description of ESet() for more
  768.               information about this command.
  769.  
  770. 1.6.4   Executing Code as command-line Input Parameters
  771.  
  772.           If a Cmm program is very short, then it can be executed wholly
  773.           from the command line.  For example, here is the famous hello
  774.           world program executed from the cli prompt:
  775.               CEnvid main() { printf("Hello world!"); }
  776.           which can be written more conisely under Cmm rules as:
  777.               CEnvid printf("Hello world!")
  778.  
  779.           You may have to keep in mind bahavior of the cli when inputting
  780.           code.  It is sometimes necessary to put quotes around code to
  781.           keep symbols from being interpreted by the cli, as in this
  782.           example:
  783.               CEnvid "for(i=0;i<10;i++) printf("%d\n",i)"
  784.           where the quotes are necessary to prevent the cli from
  785.           interpreting the "<" as file redirection.
  786.  
  787.           Also, in batch files (DOS, OS/2) you need to remember that "%"
  788.           has special meaning for the batch file processor, so the
  789.           above line in a batch would have to be written as:
  790.               CEnvid "for(i=0;i<10;i++) printf("%%d\n",i)"
  791.  
  792. 1.6.5   Executing *.CMM Source File Code
  793.  
  794.           A file with the extension ".CMM", if the file name is given as
  795.           the first parameter to CEnvi.exe, is considered by CEnvi to be
  796.           pure CMM source code.  This file with the .CMM extension is
  797.           expected to be a plain Cmm source file, just as a C compiler
  798.           expects a file with the .C extension to be C source code.  CEnvi
  799.           will check the current directory for the .CMM file, and then
  800.           check directories in the PATH environment variable.  Any
  801.           arguments passed to CEnvi.exe after the .CMM source name are
  802.           given to the main(argc,argv) function in the source, if there is
  803.           one.  So the hellow.cmm program can look identical to the
  804.           hellow.c program, and when you run CEnvi.exe hellow.cmm you get
  805.           the same output.  If you run
  806.               CEnvi.exe FOO.CMM One Two Three
  807.           the main function in FOO.CMM would get argc=4 and
  808.           argv[0]="FOO.CMM" and argv[3]="THREE".
  809.  
  810.           This means that if you were to have an executable FOO.EXE
  811.           that is similar to FOO.CMM, then "FOO.EXE" is interchangeable
  812.           with "CENVI FOO.CMM", i.e.,
  813.               FOO.EXE arg1 arg2 arg3
  814.           is the same as:
  815.               CENVI FOO.CMM arg1 arg2 arg3
  816.  
  817.           In OS/2 or Windows or other environments where file extensions
  818.           can be associated with programs, you may want to associate the
  819.           .CMM extension with CEnvi.exe, so that double-clicking on
  820.           HELLOW.CMM will act identically to double-clicking on the
  821.           compiled-and-linked HELLOW.EXE. In any of the CEnvi shells,
  822.           CEnvi scripts can be launched from the command line by simply
  823.           typing in their name.
  824.  
  825. 1.6.6   Running CEnvi from a Batch-File
  826.  
  827.           The most convenient method for executing Cmm source code from the
  828.           DOS or OS/2 command line is to use a batch file. If the first
  829.           argument to CEnvi is the name of a batch file, then CEnvi reads
  830.           that batch file and accepts as source all the code between the
  831.           lines "GOTO CENVI_EXIT" and ":CENVI_EXIT", and passes the command
  832.           line arguments to main(argc,argv).  This is very similar to
  833.           executing:
  834.               CEnvi.exe #include'foo,bat,,GOTO CENVI_EXIT,:CENVI_EXIT'
  835.           except that the '#include' statement is handled automatically by
  836.           CEnvi, and the rest of the command-line arguments are passed to
  837.           main().
  838.  
  839.           Note that ".bat" is the DOS version of the batch file name
  840.           extension.  This name is different for different operating
  841.           systems.
  842.  
  843.           In this way, a batch file can be run exactly like a .EXE file,
  844.           and the command arguments are passed to main in the same way.  If
  845.           the full path of the batch file is not supplied, then CENvi will
  846.           look in the current directory and then in directories in the
  847.           PATH.
  848.  
  849.           Here is an example of an OS/2 batch file that expects any number
  850.           (up to 9) of integers and sets the SUM environment variable to
  851.           the values added together.  (It calls CEnviSet instead of CEnvi
  852.           directly in order to set the environment variable.)
  853.  
  854.               @echo off
  855.               REM *********************************************************
  856.               REM *** SUM.CMD - Use CEnvi to sum lots of numbers together,*
  857.               REM ***           setting the SUM environment variable to   *
  858.               REM ***           the result of adding all the numbers.     *
  859.               REM *********************************************************
  860.               call CEnviSet %0.cmd %1 %2 %3 %4 %5 %6 %7 %8 %9
  861.               GOTO CENVI_EXIT
  862.  
  863.               main(argc,argv)
  864.               {
  865.                 SUM = 0;
  866.                 for ( i = 1; i < argc; i++ )
  867.                 SUM += atoi(argv[i])
  868.               }
  869.  
  870.               :CENVI_EXIT
  871.  
  872. 1.6.7   EXTPROC: *.CMD Source file (For OS/2)
  873.  
  874.           Under the OS/2 command processor, you can define an external
  875.           processor to process a batch (*.cmd) file if the first statement
  876.           is EXTPROC.  EXTPROC is followed by the name of the processor,
  877.           which in this case will be "CEnvi".  This is an example file,
  878.           ARGS.CMD, of a program to display all input parameters:
  879.  
  880.               EXTPROC CEnvi
  881.  
  882.               main(argc,argv)
  883.               {
  884.                 for ( i = 0; i < argc; i++ )
  885.                 printf("Input argument %d = \%s\n",i,argv[i]);
  886.               }
  887.  
  888. 1.6.8   Running CEnvi from a REXX-File (For OS/2)
  889.  
  890.           Similar to the running CEnvi from a Batch-File described above, 
  891.           if the first argument to CEnvi is the name of a REXX source file,
  892.           then CEnvi automatically executes the code between 
  893.           "SIGNAL CENVI_EXIT" and "CENVI_EXIT:".  This example Rexx file for
  894.           OS/2 behaves the same as the previous batch program example
  895.           (CEnviSet.cmd is an OS/2 batch file that helps run Cmm files if
  896.           environment variables need to be altered--see ESet in the OS2Lib
  897.           appendix):
  898.  
  899.               /***********************************************************
  900.                *** SUM.CMD - Use CEnvi to sum lots of numbers together,***
  901.                ***           setting the SUM environment variable to   ***
  902.                ***           the result of adding all the numbers.     ***
  903.                ***********************************************************/
  904.               'call CEnviSet %0.cmd %1 %2 %3 %4 %5 %6 %7 %8 %9'
  905.               SIGNAL CENVI_EXIT
  906.  
  907.               main(argc,argv)
  908.               {
  909.                 SUM = 0;
  910.                 for ( i = 1; i < argc; i++ )
  911.                 SUM += atoi(argv[i])
  912.               }
  913.  
  914.               CENVI_EXIT:
  915.  
  916. 1.6.9   CMM File Association and Drag-and-Drop (OS/2)
  917.  
  918.           You can associate CEnvi.exe with .cmm files through the settings
  919.           notebook of CEnvi.exe.  This lets you executed any CEnvi *.cmm
  920.           file simply by double-clicking its icon in the desktop.
  921.  
  922.           A Cmm program can be set up as a Workplace Shell program that
  923.           accepts drag and drop.  To do this, drag a program template out
  924.           of the templates folder and place it on the desktop where you
  925.           want your Cmm program to run from.  In program settings for this
  926.           program object set the program name to the path and file
  927.           specification for CEnvi.exe (e.g., "C:\CMM\CEnvi.exe").  Set
  928.           Parameters to the full source and file name of the Cmm file
  929.           (e.g., "C:\CMM\CZIP.cmm").  Then rename the program object to
  930.           whatever you want (e.g., "CZIP").  Then whenever you drag a file
  931.           onto that object then the filename will be the second argument to
  932.           main().
  933.  
  934. 1.6.10  CMM File Association and Drag-and-Drop (Windows)
  935.  
  936.           You can associate Cmm files with CEnvi.exe by using the File
  937.           Manager: select a .cmm file then choose File/Association and
  938.           select the full path to CEnvi.exe.  After this, you can run any
  939.           of *.cmm program simply by double-clicking on it.
  940.  
  941. 1.6.11  /BIND= Create Stand-Alone Cmm Executables
  942.  
  943.           The CEnvi /BIND option allows you to create stand-alone,
  944.           royalty-free executables from your Cmm code.  The result of /BIND
  945.           is a binary executable file that operates the same as if CEnvi
  946.           were invoked as an interpreter, except that CEnvi.exe is not
  947.           needed to execute the bound file, because CEnvi.exe and your Cmm
  948.           code are bound together in the created executable.
  949.  
  950.           The following example creates an executable named HELLOW.EXE that
  951.           would print "Hello world!".
  952.               CEnvi /BIND=HELLOW printf("Hello world!");
  953.  
  954.           As another example, you could create a stand-alone editor, which
  955.           we'll call CMMEDIT.EXE, from the result of the CEnvi tutorial
  956.           with the following command:
  957.  
  958.               CEnvi /BIND=CMMEDIT.EXE CMMEDIT.CMM
  959.  
  960.           Now running "CMMEDIT.EXE C:\AUTOEXEC.BAT" from the command line
  961.           would be identical to executing "CENVI.EXE CMMEDIT.CMM
  962.           C:\AUTOEXEC.BAT".
  963.  
  964. 1.6.12  /BIND for OS/2 and CEnvi2PM.EXE
  965.  
  966.           When you /BIND Cmm source code that contains calls to
  967.           PMDynamicLink(), or other PMxxx() calls that invoke CEnvi2PM.exe,
  968.           the resulting executable will still require CEnvi2PM.exe.  So
  969.           users running the bound executable will still need CEnvi2PM.exe
  970.           in a directory of their search path.  CEnvi2PM.exe may be
  971.           distributed royalty-free.
  972.  
  973. 1.6.13  /BIND for Windows
  974.  
  975.           The simplest method for using /BIND in Windows is to execute
  976.           CEnvi.exe, and then to enter the /BIND statement and Cmm source
  977.           name from the CEnvi command prompt.  For example, to turn
  978.           WhoRYou.cmm into the stand-alone WhoRYou.exe, you would execute
  979.           CEnvi.exe and then enter the following at the CEnvi "Code:"
  980.           prompt:
  981.  
  982.               Code: /BIND=WhoRYou WhoRYou.cmm
  983.  
  984. ----------------------------- FILE LIST -----------------------------------
  985.  
  986. The CEnvi Unregistered Shareware package includes all the files
  987. in the following lists.  You are not permitted to upload or otherwise transfer
  988. copies of any unregistered version of CEnvi that do not include all of the
  989. files in these lists. If you want to upload a CEnvi sharware version to a
  990. BBS, you may consider calling the Nombas BBS to download the latest shareware
  991. zip files.
  992.  
  993. --------------- CENVIW.zip Contains the following files -------------------
  994.  
  995. CENVIW.EXE:   CEnvi shareware executable for Windows
  996. SERVEWIN.COM: Allows CEnvi for Windows to control DOS Boxes
  997. CENVI.DOC:    CEnvi Shareware Manual, Chapter 1: CEnvi Unregistered Shareware
  998. CMMTUTOR.DOC: CEnvi Shareware Manual, Chapter 2: Cmm Language Tutorial
  999. CMM_VS_C.DOC: CEnvi Shareware Manual, Chapter 3: Cmm versus C, for C
  1000.               Programmers
  1001. CENVILIB.DOC: CEnvi Shareware Manual, Chapter 4: Function Library
  1002. LICENSE.DOC:  CEnvi Unregistered Shareware License Agreement
  1003. README.DOC:   Introductory file. Read this first for quick intallation.
  1004. REGISTER.DOC: CEnvi registration form
  1005. INSTALL.CMM:  Cmm source file for installing this shareware version
  1006.  
  1007. *.CMM, *.CMD, *.BAT, *.LIB: Many sample programs using CEnvi for Windows.
  1008.   See CENVI.DOC for a complete list.
  1009.  
  1010. ----------------- CENVID.zip Contains the following files -----------------
  1011.  
  1012. CENVID.EXE:   CEnvi shareware executable for DOS
  1013. CENVID32.EXE: CEnvi shareware 32 Bit executable for DOS
  1014. CMMTUTOR.DOC: CEnvi Shareware Manual, Chapter 2: Cmm Language Tutorial
  1015. CMM_VS_C.DOC: CEnvi Shareware Manual, Chapter 3: Cmm versus C, for C
  1016.               Programmers
  1017. CENVILIB.DOC: CEnvi Shareware Manual, Chapter 4: Function Library
  1018. LICENSE.DOC:  CEnvi Unregistered Shareware License Agreement
  1019. README.DOC:   Introductory file. Read this first for quick intallation.
  1020. REGISTER.DOC: CEnvi registration form
  1021. INSTALL.CMM:  Cmm source file for installing this shareware version
  1022.  
  1023. *.CMM, *.CMD, *.BAT, *.LIB: Many sample programs using CEnvi for DOS.
  1024.   See CENVI.DOC for a complete list.
  1025.  
  1026.  
  1027. ------------------CENVI2.zip Contains the following files -----------------
  1028.  
  1029. CENVI2.EXE:   CEnvi shareware executable for OS/2
  1030. CENVI2PM.EXE: Gateway program, executed transparently by CEnvi, for access
  1031.               to PM-dependent system calls (OS/2 version only).
  1032. CENVI.DOC:    CEnvi Shareware Manual, Chapter 1: CEnvi Unregistered Shareware
  1033. CMMTUTOR.DOC: CEnvi Shareware Manual, Chapter 2: Cmm Language Tutorial
  1034. CMM_VS_C.DOC: CEnvi Shareware Manual, Chapter 3: Cmm versus C, for C
  1035.               Programmers
  1036. CENVILIB.DOC: CEnvi Shareware Manual, Chapter 4: Function Library
  1037. LICENSE.DOC:  CEnvi Unregistered Shareware License Agreement
  1038. README.DOC:   Introductory file. Read this first for quick intallation.
  1039. REGISTER.DOC: CEnvi registration form
  1040. INSTALL.CMM:  Cmm source file for installing this shareware version
  1041.  
  1042. *.CMM, *.CMD, *.BAT, *.LIB: Many sample programs using CEnvi for OS/2.
  1043.   See CENVI.DOC for a complete list.
  1044.  
  1045. -------------------------- REGISTRATION --------------------------------
  1046.  
  1047. This is a shareware release  Please register.  As a registered CEnvi user
  1048. you will receive the following benefits:
  1049.  
  1050. *The latest version of CEnvi for all supported platforms (currently DOS,
  1051.   OS/2, and Windows).
  1052.   
  1053. *The CEnvi user's manual, over 100 pages, including a description of the
  1054.   Cmm programming language and a tutorial for those who have never programmed,
  1055.   and descriptions and examples of the over 150 functions included in the
  1056.   CEnvi library).
  1057.   
  1058. *Free incremental electronic downloads for new versions of CEnvi for all
  1059.   supported operating systems.
  1060.   
  1061. *Unlimited support from Nombas and CEnvi/Cmm users through CompuServe
  1062.   (72212,1622), internet bsn@world.std.com), the cenvi-cmm e-mail mailing
  1063.   list (cenvi-cmm@world.std.com), phone (617-391-6595), the Nombas BBS
  1064.   (617-391-3718), or Compuserve in IBMSYS forum 3.
  1065.   
  1066. *Access to the growing list of CEnvi utilities and libraries (some of which
  1067.   are included in this unregistered shareware package, and others are
  1068.   contributed by Nombas and CEnvi/Cmm users to the electronic locations
  1069.   described above). Available on the Nombas BBS, from internet via
  1070.   anonymous ftp at ftp.std.com in the /vendors/CEnvi-Cmm directory, or in
  1071.   CompuServe in IBMSYS library 3 (search on CEnvi, Cmm, CENV, & CNV).
  1072.  
  1073. There are three ways to register CEnvi version 2.00: 
  1074.  
  1075. ************************************************************************
  1076. ********* REGISTRATION METHOD 1: CENVI MAIL-IN REGISTRATION FORM **********
  1077. ************************************************************************
  1078. Please fill out and mail this form, along with payment.
  1079.  
  1080. Where did you get CEnvi? ___________________________________________
  1081.  
  1082. Name: ______________________________________________________________
  1083.  
  1084. Company: ___________________________ Position: _____________________
  1085.  
  1086. Address: ___________________________________________________________
  1087.  
  1088. ____________________________________________________________________
  1089.  
  1090. ____________________________________________________________________
  1091.  
  1092. Country: ______________________   (add ZIP code if applicable)
  1093.  
  1094. Phone: ________________________  EMail: ______________________________
  1095.  
  1096.  
  1097. CEnvi Registered License Manual ... Quantity   _____ x $45.00 = $ _________
  1098. License fee for additional CEnvi users at your
  1099. Organization (does not include additional manual
  1100. or diskettes)... Additional simultaneous users _____ x $15.00 = $ _________
  1101.  
  1102. Additional CEnvi Manuals ......... Quantity    _____ x $10.00 = $ _________
  1103.  
  1104. Shipping outside USA, Canada, or Mexico  $4.00 ................ $ _________
  1105.  
  1106.                                                        Subtotal $ _________
  1107.                                                     
  1108. Massachusetts residents please add 5% sales tax ............... $ _________
  1109.  
  1110. Check handling fee IF CHECK NOT DRAWN ON A U.S. BANK . $30.00 = $ _________
  1111.  
  1112.                                                           Total $ _________
  1113.  
  1114. Include a check or money order for this total, IN U.S. FUNDS AND DRAWN ON A
  1115. U.S. BANK (if not drawn on a U.S. bank then add the $30 handling fee),
  1116. payable to Nombas, or supply the following credit card payment information.
  1117. Credit cards orders will be processed through a distributor: Custom
  1118. Computer Systems of Medford MA.
  1119.  
  1120. Credit card orders (circle one): MasterCard / Visa / American Express
  1121.  
  1122.                                  Discover / Carte Blanche / Diners Club
  1123.  
  1124.     Card Number _____________________________________  Expires ____________
  1125.  
  1126.     Exact name on card (print) ____________________________________________
  1127.  
  1128.     Signature (REQUIRED) __________________________________________________
  1129.  
  1130. Mail this form, along with payment or credit information, to:
  1131.                Nombas
  1132.                64 Salem Street
  1133.                MEDFORD MA 02155   USA
  1134.  
  1135.  
  1136. ***************************************************************************
  1137. ******** REGISTRATION METHOD 2: COMPUSERVE ELECTRONIC REGISTRATION ********
  1138. ***************************************************************************
  1139. CompuServe members may register directly through the CompuServe
  1140. Registration Service.  To use this service enter GO SWREG at your CI$
  1141. prompt.  Registration ID is 1354 for CEnvi for DOS, 1355 for CEnvi for
  1142. OS/2, and 1356 for CEnvi for Windows (you only need to register ONE
  1143. version).  Nombas will immediately be informed of your registration, and
  1144. the CEnvi registration fee will automatically be added to your CompuServe
  1145. bill.
  1146.  
  1147.  
  1148. ***************************************************************************
  1149. ************ REGISTRATION METHOD 3: Public (software) Library *************
  1150. ***************************************************************************
  1151. CREDIT CARD ORDERS ONLY -
  1152.  
  1153. You can order with MC, Visa, Amex, or Discover from Public (software)
  1154. Library by calling 800-2424-PsL or 713-524-6394 or by FAX to 713-524-6398
  1155. or by CIS EMail to 71355,470. You can also mail credit card orders to PsL
  1156. at P.O.Box 35705, Houston, TX 77235-5705.
  1157.  
  1158. THE ABOVE NUMBERS ARE FOR ORDERS ONLY.
  1159.  
  1160. Any questions about the status of the shipment of the order, refunds,
  1161. registration options, product details, technical support, volume discounts,
  1162. dealer pricing, site licenses, etc., must be directed to Nombas (see phone
  1163. number and addresses below).
  1164.  
  1165. To insure that you get the latest version, PsL will notify Nombas the day
  1166. of your order and we will ship the product directly to you.
  1167.  
  1168. CEnvi (all versions) is PsL product #11069.  Prices (including shipping and
  1169. handling) are: $49 US/Canada and $52 overseas.
  1170.  
  1171.  
  1172. ***************************************************************************
  1173. Thank you for trying this shareware copy of CEnvi.  Mail inquires and other
  1174. correspondences to:
  1175.      Nombas
  1176.      64 Salem Street
  1177.      Medford, MA  02155   USA
  1178.  
  1179. Nombas may also be contacted at:
  1180.      Phone:      (617)391-6595
  1181.      Internet:   bsn@world.std.com
  1182.      CompuServe: 72212,1622
  1183.      BBS:        (617)391-3718
  1184.      Fax:        (617)391-3842
  1185.